package c.a.a;

import android.content.Context;
import java.util.concurrent.Callable;

/* compiled from: LottieCompositionFactory */
public class h implements Callable<r<f>> {
    public final /* synthetic */ Context a;
    public final /* synthetic */ String b;
    public final /* synthetic */ String c;

    public h(Context context, String str, String str2) {
        this.a = context;
        this.b = str;
        this.c = str2;
    }

    /* JADX WARNING: Removed duplicated region for block: B:21:0x0077  */
    public java.lang.Object call() throws java.lang.Exception {
        /*
        r10 = this;
        r0 = r10.a;
        r1 = r10.b;
        r2 = r10.c;
        r3 = new c.a.a.c0.c;
        r3.m739init(r0, r1, r2);
        r0 = c.a.a.c0.a.ZIP;
        r1 = r3.c;
        r2 = 0;
        if (r1 != 0) goto L_0x0014;
    L_0x0012:
        goto L_0x009a;
    L_0x0014:
        r4 = r3.b;
        r5 = new java.io.File;	 Catch:{ FileNotFoundException -> 0x0073 }
        r6 = r1.b();	 Catch:{ FileNotFoundException -> 0x0073 }
        r7 = c.a.a.c0.a.JSON;	 Catch:{ FileNotFoundException -> 0x0073 }
        r8 = 0;
        r9 = c.a.a.c0.b.a(r4, r7, r8);	 Catch:{ FileNotFoundException -> 0x0073 }
        r5.<init>(r6, r9);	 Catch:{ FileNotFoundException -> 0x0073 }
        r6 = r5.exists();	 Catch:{ FileNotFoundException -> 0x0073 }
        if (r6 == 0) goto L_0x002d;
    L_0x002c:
        goto L_0x0042;
    L_0x002d:
        r5 = new java.io.File;	 Catch:{ FileNotFoundException -> 0x0073 }
        r1 = r1.b();	 Catch:{ FileNotFoundException -> 0x0073 }
        r6 = c.a.a.c0.b.a(r4, r0, r8);	 Catch:{ FileNotFoundException -> 0x0073 }
        r5.<init>(r1, r6);	 Catch:{ FileNotFoundException -> 0x0073 }
        r1 = r5.exists();	 Catch:{ FileNotFoundException -> 0x0073 }
        if (r1 == 0) goto L_0x0041;
    L_0x0040:
        goto L_0x0042;
    L_0x0041:
        r5 = r2;
    L_0x0042:
        if (r5 != 0) goto L_0x0045;
    L_0x0044:
        goto L_0x0073;
    L_0x0045:
        r1 = new java.io.FileInputStream;	 Catch:{ FileNotFoundException -> 0x0073 }
        r1.<init>(r5);	 Catch:{ FileNotFoundException -> 0x0073 }
        r6 = r5.getAbsolutePath();
        r8 = ".zip";
        r6 = r6.endsWith(r8);
        if (r6 == 0) goto L_0x0057;
    L_0x0056:
        r7 = r0;
    L_0x0057:
        r6 = "Cache hit for ";
        r8 = " at ";
        r4 = c.b.a.a.a.j(r6, r4, r8);
        r5 = r5.getAbsolutePath();
        r4.append(r5);
        r4 = r4.toString();
        c.a.a.e0.c.a(r4);
        r4 = new b.i.j.b;
        r4.m509init(r7, r1);
        goto L_0x0074;
    L_0x0073:
        r4 = r2;
    L_0x0074:
        if (r4 != 0) goto L_0x0077;
    L_0x0076:
        goto L_0x009a;
    L_0x0077:
        r1 = r4.a;
        r1 = (c.a.a.c0.a) r1;
        r4 = r4.b;
        r4 = (java.io.InputStream) r4;
        if (r1 != r0) goto L_0x008d;
    L_0x0081:
        r0 = new java.util.zip.ZipInputStream;
        r0.<init>(r4);
        r1 = r3.b;
        r0 = c.a.a.g.g(r0, r1);
        goto L_0x0093;
    L_0x008d:
        r0 = r3.b;
        r0 = c.a.a.g.d(r4, r0);
    L_0x0093:
        r0 = r0.a;
        if (r0 == 0) goto L_0x009a;
    L_0x0097:
        r2 = r0;
        r2 = (c.a.a.f) r2;
    L_0x009a:
        if (r2 == 0) goto L_0x00a2;
    L_0x009c:
        r0 = new c.a.a.r;
        r0.m800init(r2);
        goto L_0x00c5;
    L_0x00a2:
        r0 = "Animation for ";
        r0 = c.b.a.a.a.g(r0);
        r1 = r3.b;
        r0.append(r1);
        r1 = " not found in cache. Fetching from network.";
        r0.append(r1);
        r0 = r0.toString();
        c.a.a.e0.c.a(r0);
        r0 = r3.a();	 Catch:{ IOException -> 0x00be }
        goto L_0x00c5;
    L_0x00be:
        r0 = move-exception;
        r1 = new c.a.a.r;
        r1.m801init(r0);
        r0 = r1;
    L_0x00c5:
        return r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.a.a.h.call():java.lang.Object");
    }
}
